import tool from '../tool'
import util from '_util/index'
import logic from '_logic'
const store = util.store
import _ from 'lodash'

export default{
    getopBtnsConf(_this, ctl){
        let model=util.store.getModelByCtl(_this,ctl);
        let opBtns= model.opBtns;
        // tool.cl('opBtns:', opBtns);
        if(!opBtns) {
            return null;
        }

        let lines = tool.getLines(opBtns);
        // tool.cl('lines:', lines);
        let conf = {};
        lines.forEach(line => {
            let [field, title] = _.split(line, ':');
            conf[field]=title;
        });
        // tool.cl('conf:', conf);
        return conf;
    },
}
